<?php
/**
 * $Id: constants.php 22 2011-11-22 06:36:37Z nhnoah $; 
 * constants.php, general constants
 * 
 * All user define constants
 *  
 * ================================================================
 * @package     msys-file-manager
 * @category    configurations
 * ================================================================
 * 
 * @author      Hamdiya <hamdiya.dev@gmail.com>
 * @copyright   Copyright (c) 2009, Hamdiya
 * @license     http://www.gnu.org/licenses/gpl.html GNU General Public License 2
 * @link        http://dir-list.sourceforge.net/
 * 
 * @author      nhnoah <nhnoah+msys@gmail.com> 
 * @copyright   Copyright (c) 2011, Nuar H. Noah (nhnoah) 
 * @license     http://www.gnu.org/licenses/lgpl.html GNU Lesser GPL
 * @link        http://msys-file-manager.googlecode.com/
 * 
 * ================================================================
 * SVN revision information:
 * 
 * @version $Revision: 22 $:
 * @author  $Author: nhnoah $:
 * @date    $Date: 2011-11-22 06:36:37 +0000 (Tue, 22 Nov 2011) $:
 * ================================================================
 * 
 * @since   0.3.1 (Date: 2011-11-21 23:07:02 +0800 (Mon, 21 Nov 2011)
 */

/**
 * simple debugger, throw and die.
 * 
 * @param mixed $params 
 * @uses var_dump() Dumps information about a variable recursively
 * @return void
 */
function _dump($params){
    $style = 'width:90%;height:450px;overflow:auto;border:5px solid #ddd;padding:10px;margin:1em auto';
    echo '<pre style="'.$style.'">';
    var_dump($params);
    echo '</pre>';
    exit();
}

/**
 * ================================================================
 * Constants
 * ================================================================
 */
 
 
define('DIRSEP',DIRECTORY_SEPARATOR);
define('BASE_DIR',str_replace('constants.php','',__FILE__) );
define('LIB_DIR',BASE_DIR.'matrix-sys'.DIRSEP);
define('CLASS_DIR',LIB_DIR.'class'.DIRSEP );
define('MOD_DIR',LIB_DIR.'modules'.DIRSEP);

// base url
define('BASE_URI','matrix-sys/' );
define('ICONS_URI',BASE_URI.'icons/');
define('ICONS_LARGE_URI',BASE_URI.'icons_large/');
define('THUMBS_URI',BASE_URI.'thumbs/');
define('EDIT_ICONS_URI',BASE_URI.'edit_files/');
define('GALLERY_ICONS_URI',BASE_URI.'gallery_files/');
define('MEDIAPLAYER_ICONS_URI',BASE_URI.'media_player_files/');
define('CSS_URI',BASE_URI.'css/');
define('JS_URI',BASE_URI.'js/');

// SERVER
define('RETURN_URI', $_SERVER['SCRIPT_NAME']);
define('SELF_URI', $_SERVER['PHP_SELF']);


/**
 * ================================================================
 * Include all base files
 * ================================================================
 */
  
require(MOD_DIR.'utils.php'); 

/**
 *  Configurations settings 
 */
require(LIB_DIR.'config.php');

/**
 *  Default functions
 */
require(LIB_DIR.'functions.php');

/**
 *  static enum constant
 */
require(CLASS_DIR.'enum.php');